<template>
	<div :style="{'width':width}" class="cmsInput">
		<el-input-number
			v-model.number="input"
			size="mini"
			type="txt">
		</el-input-number>
	</div>
</template>

<script>
export default {
	model: {
	    prop: 'inputVal',
	    event: 'change'
  	},
	props:["inputVal","width"],
	data () {
		return {
			input:""
		}
	},
	watch:{
		input(val){
			this.$emit('change',val);
		}
	},
	mounted(){
		this.input = this.inputVal;
	}
}
</script>

<style lang="scss" scoped>
	/deep/ .el-input-number__decrease{
		display: none;
	}
	/deep/ .el-input-number__increase{
		display: none;
	}
	/deep/ .el-input-number .el-input__inner{
		text-align: left;
	}
	/deep/ .el-input-number--small .el-input__inner{
		padding-left: 15px;
	}
	.cmsInput{
		width: 100%;
		margin: 0 6px;
	}
</style>
